package com.hunttown.mes.rpc.domain;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * created by wangjunfu on 2020-10-05 16:33:35
 */
public class IotTimedTasksDTO implements Serializable {
    private Integer id;
    private Integer entId;
    private String taskName;
    private Integer taskType;
    private Integer equipType;
    private Integer equipId;
    private Integer areaId;
    private Integer userId;
    private Integer status;
    private Date startDate;
    private Date endDate;
    private Date beginTime;
    private Date endTime;
    private String cronYear;
    private String cronWeek;
    private String cronMonth;
    private String cronDay;
    private String cronHour;
    private String cronMinute;
    private String cronSecond;
    private String executeTactic;
    private Integer isExecuteOnce;
    private Integer failTactic;
    private Integer retryTimes;
    private Integer result;
    private Integer isSystem;
    private String equipidsArray;
    private Integer operateType;
    private String conditionJson;
    private String remark;
    private Integer adminId;
    private Date createTime;
    private Integer stopFlag;
    private Integer deleteFlag;

    private String equipName;
    private String areaName;
    private String userName;
    private String taskTypeName;
    private String equipTypeName;
    private String statusName;
    private String failTacticName;
    private String executeTacticName;
    private String startDateSr;
    private String endDateSr;
    private String beginTimeSr;
    private String endTimeSr;

    //以下内容由Alt+Ins快捷生成

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getEntId() {
        return entId;
    }

    public void setEntId(Integer entId) {
        this.entId = entId;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public Integer getTaskType() {
        return taskType;
    }

    public void setTaskType(Integer taskType) {
        this.taskType = taskType;
    }

    public Integer getEquipType() {
        return equipType;
    }

    public void setEquipType(Integer equipType) {
        this.equipType = equipType;
    }

    public Integer getEquipId() {
        return equipId;
    }

    public void setEquipId(Integer equipId) {
        this.equipId = equipId;
    }

    public Integer getAreaId() {
        return areaId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getCronYear() {
        return cronYear;
    }

    public void setCronYear(String cronYear) {
        this.cronYear = cronYear;
    }

    public String getCronWeek() {
        return cronWeek;
    }

    public void setCronWeek(String cronWeek) {
        this.cronWeek = cronWeek;
    }

    public String getCronMonth() {
        return cronMonth;
    }

    public void setCronMonth(String cronMonth) {
        this.cronMonth = cronMonth;
    }

    public String getCronDay() {
        return cronDay;
    }

    public void setCronDay(String cronDay) {
        this.cronDay = cronDay;
    }

    public String getCronHour() {
        return cronHour;
    }

    public void setCronHour(String cronHour) {
        this.cronHour = cronHour;
    }

    public String getCronMinute() {
        return cronMinute;
    }

    public void setCronMinute(String cronMinute) {
        this.cronMinute = cronMinute;
    }

    public String getCronSecond() {
        return cronSecond;
    }

    public void setCronSecond(String cronSecond) {
        this.cronSecond = cronSecond;
    }

    public String getExecuteTactic() {
        return executeTactic;
    }

    public void setExecuteTactic(String executeTactic) {
        this.executeTactic = executeTactic;
    }

    public Integer getIsExecuteOnce() {
        return isExecuteOnce;
    }

    public void setIsExecuteOnce(Integer isExecuteOnce) {
        this.isExecuteOnce = isExecuteOnce;
    }

    public Integer getFailTactic() {
        return failTactic;
    }

    public void setFailTactic(Integer failTactic) {
        this.failTactic = failTactic;
    }

    public Integer getRetryTimes() {
        return retryTimes;
    }

    public void setRetryTimes(Integer retryTimes) {
        this.retryTimes = retryTimes;
    }

    public Integer getResult() {
        return result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }

    public Integer getIsSystem() {
        return isSystem;
    }

    public void setIsSystem(Integer isSystem) {
        this.isSystem = isSystem;
    }

    public String getEquipidsArray() {
        return equipidsArray;
    }

    public void setEquipidsArray(String equipidsArray) {
        this.equipidsArray = equipidsArray;
    }

    public Integer getOperateType() {
        return operateType;
    }

    public void setOperateType(Integer operateType) {
        this.operateType = operateType;
    }

    public String getConditionJson() {
        return conditionJson;
    }

    public void setConditionJson(String conditionJson) {
        this.conditionJson = conditionJson;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStopFlag() {
        return stopFlag;
    }

    public void setStopFlag(Integer stopFlag) {
        this.stopFlag = stopFlag;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getEquipName() {
        return equipName;
    }

    public void setEquipName(String equipName) {
        this.equipName = equipName;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getTaskTypeName() {
        return taskTypeName;
    }

    public void setTaskTypeName(String taskTypeName) {
        this.taskTypeName = taskTypeName;
    }

    public String getEquipTypeName() {
        return equipTypeName;
    }

    public void setEquipTypeName(String equipTypeName) {
        this.equipTypeName = equipTypeName;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public String getFailTacticName() {
        return failTacticName;
    }

    public void setFailTacticName(String failTacticName) {
        this.failTacticName = failTacticName;
    }

    public String getExecuteTacticName() {
        return executeTacticName;
    }

    public void setExecuteTacticName(String executeTacticName) {
        this.executeTacticName = executeTacticName;
    }

    public String getStartDateSr() {
        if (startDateSr == null || startDateSr.equals("")) {
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

            if (startDate == null) {
                return "1990-01-01";
            } else {
                return df.format(new Date(startDate.getTime()));
            }
        } else {
            return startDateSr;
        }
    }

    public void setStartDateSr(String startDateSr) {
        this.startDateSr = startDateSr;
    }

    public String getEndDateSr() {
        if (endDateSr == null || endDateSr.equals("")) {
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

            if (endDate == null) {
                return "1990-01-01";
            } else {
                return df.format(new Date(endDate.getTime()));
            }
        } else {
            return endDateSr;
        }
    }

    public void setEndDateSr(String endDateSr) {
        this.endDateSr = endDateSr;
    }

    public String getBeginTimeSr() {
        if (beginTimeSr == null || beginTimeSr.equals("")) {
            SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");

            if (beginTime == null) {
                return "00:00:00";
            } else {
                return df.format(new Date(beginTime.getTime()));
            }
        } else {
            return beginTimeSr;
        }
    }

    public void setBeginTimeSr(String beginTimeSr) {
        this.beginTimeSr = beginTimeSr;
    }

    public String getEndTimeSr() {
        if (endTimeSr == null || endTimeSr.equals("")) {
            SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");

            if (endTime == null) {
                return "00:00:00";
            } else {
                return df.format(new Date(endTime.getTime()));
            }
        } else {
            return endTimeSr;
        }
    }

    public void setEndTimeSr(String endTimeSr) {
        this.endTimeSr = endTimeSr;
    }
}